/**
 * This test-case is used to create the separate processes of various home depot components
 * i.e. Customer / manager/ cash-register / clerk / stockboy
 */

/**
 * spawns a customer process
 */
void customer()
{
	int i;

	for(i=0;i<20;i++)
	{
	Exec("../test/Customer",16);
	}
}

/**
 * spawns a manager process
 */
void manager()
{
	Exec("../test/Manager",15);
}

/**
 * spawns a stockboy process
 */
void stockboy()
{
	Exec("../test/StockBoy",16);
	Exec("../test/StockBoy",16);
	Exec("../test/StockBoy",16);

}

/**
 * spawns a cashregister process
 */
void cashregister()
{
	Exec("../test/Cashreg",15);
	Exec("../test/Cashreg",15);
	Exec("../test/Cashreg",15);
}

/**
 * spawns a clerk process
 */
void clerk()
{

	Exec("../test/Clerk",13);
	Exec("../test/Clerk",13);
	Exec("../test/Clerk",13);
}


void main()
{
	int testcase;

		Print(" 1.Instantiate Manager\n");
		Print(" 2.Instantiate Customer\n");
		Print(" 3.Instantiate Stockboy\n");
		Print(" 4.Instantiate CashRegister\n");
		Print(" 5.Instantiate Clerk\n");
		Print("\n");

		Print("Enter Choice:\n");
		testcase=Scan();

		Print("\n\n");

		switch(testcase)
		{
		case 1:
			manager();
			break;
		case 2:
			customer();
			break;
		case 3:
			stockboy();
			break;
		case 4:
			cashregister();
			break;
		case 5:
			clerk();
			break;
		default:
			Print("Please select a proper test-case choice\n");
		}

		Exit(0);
}
